package com.cqjtu.platform.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author pengyangyan
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "user")
public class User extends BaseEntity{

    /**
     * 用户名称
     */
    @Column(length = 20)
    private String userName;

    /**
     * 性别
     */
    @Column
    private String sex;

    /**
     * 账户名称  要求唯一
     */
    @Column(nullable = false,length = 20)
    private String account;

    /**
     * 密码
     */
    @Column(nullable = false)
    private String password;

    /**
     * 电话
     */
    @Column(length = 11)
    private String phone;

    /**
     * 角色id
     */
    @Column
    private Integer roleId;

    /**
     * 账户余额
     */
    @Column
    private Double balance;

    /**
     * 信用分数
     */
    @Column
    private Integer credit;
    /**
     * 头像
     */
    @Column
    private String photo;




}
